home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11744 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.primenet.com!not-for-mail
  2. From: gbe@primenet.com (Gary Edstrom)
  3. Newsgroups: comp.lang.c++
  4. Subject: Help Wanted: Win95 System Tray Icons: Getting Coordinates of Mouse Click
  5. Date: 15 Mar 1996 16:45:01 -0700
  6. Organization: Sequoia Software
  7. Sender: root@primenet.com
  8. Message-ID: <3149fe39.169953417@news.primenet.com>
  9. X-Posted-By: ip040.lax.primenet.com
  10. X-Newsreader: Forte Agent .99d/32.182
  11.  
  12. I have written a small Windows 95 program that makes use of the system tray in
  13. Windows 95.  I place an icon in the tray and I would like to cause a menu to
  14. pop up when the user right-clicks on one of my icons.  I would like this popup
  15. menu to appear right next to where the operator clicked the mouse.  I have
  16. succeeded in getting the menu to pop up on the screen, but I have not been able
  17. to figure out how to get the coordinates of the click for the purpose of
  18. locating the popup menu next to the click.
  19.  
  20. I would know how to do this if I was clicking the mouse anywhere in the client
  21. area of my application.  The tray icons, however, reside outside of my client
  22. area.  I have been able to receive mouse message callbacks in my callback
  23. procedure for the system tray, but these callback messages do not seem to
  24. include mouse position information.
  25.  
  26. I have seen this done in several different applications.  For example, when you
  27. right-click on the System Agent tray icon, you get a popup menu right by where
  28. you clicked on the icon.  This is what I wish to do in my application.
  29.  
  30. Can anyone help?
  31.  
  32. Thanks in advance.
  33.  
  34. --
  35. Gary Edstrom <gbe@primenet.com> | Sequoia Software
  36. PO Box 9573                     | Programming & Technical Services
  37. Glendale CA 91226-0573          | PGP Key ID: 0x1A0D44BD
  38. PGP Fingerprint: 72 AA 4F 73 05 53 89 C6  8A EE F4 EE D1 C0 13 8D 
  39.